﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SuperStarProject.Models.QuaTangModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Thêm quà tặng cho sản phẩm
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>
        
<script type="text/javascript" language="javascript">
    function Addlink() {
        var hinhanh = parseInt(document.getElementsByName("ImageUp")[0].value); 
        document.getElementsByName("HinhAnh")[0].value = hinhanh;    
    }
</script>

        <fieldset>
            <legend><h2>Thêm quà tặng cho sản phẩm</h2></legend>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.MaQua) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.MaQua) %>
                <%= Html.ValidationMessageFor(model => model.MaQua) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.MaSanPham) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.MaSanPham, new { @readonly = "readonly" })%>
                <%= Html.ValidationMessageFor(model => model.MaSanPham) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.HinhAnh) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.HinhAnh)%>
            </div>
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Ten) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Ten) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.DiemThuong) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.DiemThuong) %>
                <%= Html.ValidationMessageFor(model => model.DiemThuong) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.SoLuongToiDaDuocChon) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.SoLuongToiDaDuocChon) %>
                <%= Html.ValidationMessageFor(model => model.SoLuongToiDaDuocChon) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.SoLuongNhapKho) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.SoLuongNhapKho) %>
                <%= Html.ValidationMessageFor(model => model.SoLuongNhapKho) %>
            </div>
            
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

